import request from '@/utils/request'

// 保存、修改
export function saveOrUpdateAssess(url, data) {
  return request({
    url: `${url}/saveOrUpdate`,
    method: 'post',
    data
  })
}
// 详情
export function getById(url, params) {
  return request({
    url: `/${url}/getById`,
    method: 'get',
    params
  })
}
// 查询
export function getPage(url, params) {
  return request({
    url: `/${url}/page`,
    method: 'get',
    params
  })
}

// 数据源数据
export function getDataSource(params) {
  return request({
    url: `/lifelineData/page`,
    method: 'get',
    params
  })
}
// 根据生命线数据的版本号查询矢量数据
export function getVectorDataSource(params) {
  return request({
    url: `/estimate/getVectorByVersionId`,
    method: 'get',
    params
  })
}

// SQL查询超图图层数据
export function mapSqlQueryResultsPost(data) {
  return request({
    url: `/hypergraph/mapSqlQueryResultsPost`,
    method: 'post',
    data
  })
}

// 下游追踪
export function networkTracedown(params) {
  return request({
    url: `/hypergraph/networkTracedown`,
    method: 'get',
    params
  })
}

// 上游追踪
export function networkTraceup(params) {
  return request({
    url: `/hypergraph/networkTraceup`,
    method: 'get',
    params
  })
}

// 爆管分析
export function networkBurstanalyse(params) {
  return request({
    url: `/hypergraph/networkBurstanalyse`,
    method: 'get',
    params
  })
}

// 连通性分析
export function networkConnectededges(params) {
  return request({
    url: `/hypergraph/networkConnectededges`,
    method: 'get',
    params
  })
}